package script;

import define.AttributeType;

public class Attribute 
{
	private int m_start;
	private int m_end;
	private AttributeType m_type;
	private int m_position;
	private Variable m_variable;
	private boolean m_isString;
	
	public Attribute(AttributeType type, int position)
	{
		m_type = type;
		m_position = position;
	}
	
	public Attribute(AttributeType type, Variable var, boolean isString, int position)
	{
		m_type = type;
		m_position = position;
		m_variable = var;
		m_isString = isString;
	}
	
	public Attribute(int start, int end, int position)
	{
		m_start = start;
		m_end = end;
		m_type = AttributeType.E_SPLIT_ATTR;
		m_position = position;
	}
	
	public int getStart()
	{
		return m_start;
	}
	
	public int getEnd()
	{
		return m_end;
	}
	
	public AttributeType getType()
	{
		return m_type;
	}
	
	public int getPosition()
	{
		return m_position;
	}
	
	public Variable getVariable()
	{
		return m_variable;
	}
	
	public boolean getIsString()
	{
		return m_isString;
	}
}
